<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let allBtn = [
        '重命名报告',
        '删除报告页',
        '新增续页',
        '新增通用页',
        '新增通用续页',
        '新增PDF页',
        '新增部件',
        '插入同级通用页',
        '插入同级部件',
        '插入同级PDF页',
        '分发历史',
        '送审',
        '退回',
        '完结'
      ]

      let btnArr = ['插入同级通用页', '插入同级部件', '插入同级PDF页']

      let myNoSee = allBtn.filter(item => !btnArr.some(subItem => item === subItem))

      var operBtn = [
        {
          icon: 'el-icon-s-claim',
          text: '保存报告',
          fnName: 'saveRep'
        },
        {
          icon: 'el-icon-receiving',
          text: '送审报告',
          fnName: 'sendRep'
        },
        {
          icon: 'el-icon-takeaway-box',
          text: '退回报告',
          fnName: 'returnRep'
        },
        {
          icon: 'el-icon-document-copy',
          text: '复制报告',
          fnName: 'copyRep'
        },
        {
          icon: 'el-icon-reading',
          text: '预览报告',
          fnName: 'viewRep'
        },
        {
          icon: 'el-icon-cpu',
          text: '设备信息',
          fnName: 'equInfo'
        },
        {
          icon: 'el-icon-notebook-1',
          text: '我的词库',
          fnName: 'myWords'
        },
        {
          icon: 'el-icon-notebook-2',
          text: '我的图库',
          fnName: 'myImg'
        },
        {
          icon: 'el-icon-refresh',
          text: '刷新信息',
          fnName: 'refresh'
        },
        {
          icon: 'el-icon-mobile',
          text: '报告同步',
          fnName: 'reportSync'
        },
        {
          icon: 'el-icon-connection',
          text: '分发报告页',
          fnName: 'distributeRep'
        },
        {
          icon: 'el-icon-link',
          text: '归还报告页',
          fnName: 'reventRep'
        }
      ]

      let needClude = ['报告同步', '分发报告页', '归还报告页']
      function arrClude(needClude) {
        operBtn = operBtn.filter(item => needClude.some(subItem => item.text === subItem))
      }
      arrClude(needClude)
      console.log('[ operBtn ] >', operBtn)
    </script>
  </body>
</html>
